package  com.songyl.patternLearn.ObserverPattern;

/**
 * 具体观察者
 */
public class PlayerB extends PlayerObserver{

    RegistryPlayer registryPlayer;


    public PlayerB(RegistryPlayer registryPlayer) {
        this.registryPlayer=registryPlayer;
        this.registryPlayer.registryObserver(this);
    }

    @Override
    void updateOBState() {
        System.out.println("PlayerB 看到的画面:OB选手 HP="+this.registryPlayer.getHP());
    }
}
